<!DOCTYPE html>
<html lang="ch-cmn-Hans">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://unpkg.com/vue@3.1.4/dist/vue.global.js"></script>
  <title>地质大学刷课工具</title>
  <style>
    fieldset {
      margin-top: 20px;
    }

    select {
      width: 150px;
    }
  </style>
</head>

<body style="font-size: 16px;">
  <div id="app">
    <fieldset>
      <legend>登录信息</legend>
      <input id="username" v-model="username" type="text" placeholder="学号">
      <input id="password" v-model="password" type="password" placeholder="身份证号">
      <br><br>
      <button type="submit" @click="login" id="submit">{{loading?'登录中，大概需要10s，这取决于您的网络': isLogin?'已登录':'登录'}}</button>
    </fieldset>
    <fieldset v-if="isLogin">
      <legend>选择课程(一次只能刷一门课)</legend>
      <select v-model="selectClass">
        <option :value="item" v-for="item in classList" :key="item">{{item}}</option>
      </select>
    </fieldset>
    <fieldset v-if="isLogin">
      <legend>刷几遍?</legend>
      <select v-model="repeatTimes">
        <option :value="item" v-for="item in 5" :key="item">{{item}}</option>
      </select>
      <br>
      <i style="font-size: 12px;">根据该课程的时间酌情选择</i>
    </fieldset>
    <fieldset v-if="isLogin">
      <legend>是否显示刷课的浏览器</legend>
      显示<input v-model="headless" value="Yes" type="radio" />
      不显示<input v-model="headless" value="No" type="radio" />
    </fieldset>
    <div v-if="isLogin" style="text-align: center;padding-top: 10px;">
      <button @click="start">开始刷课</button>
    </div>
  </div>
  <script type="module" src="./render.js"></script>
</body>

</html>